package com;

import java.util.Scanner;

public class demo2 {

	public static void main(String[] args) {
	/*	int sum1=1;
		int n=3;
		int sum2=0;
			for(int i=1;i<=n;i++) {
				sum1 *= i;
				sum2 += sum1;
			}
			System.out.println(sum2);	
			*/
		Scanner input = new Scanner(System.in);
		factorial factorial = new factorial();
		System.out.println("请输入要计算的阶乘和：");
		factorial.setN(input.nextInt());
		factorial.fa();
		
	}
		
}
